/* ***** BEGIN LICENSE BLOCK *****
 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
 * 
 * The contents of this file are subject to the Mozilla Public License
 * Version 1.1 (the "License"); you may not use this file except in
 * compliance with the License. You may obtain a copy of the License at
 * http://www.mozilla.org/MPL/
 * 
 * Software distributed under the License is distributed on an "AS IS"
 * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
 * License for the specific language governing rights and limitations
 * under the License.
 * 
 * The Original Code is Komodo code.
 * 
 * The Initial Developer of the Original Code is ActiveState Software Inc.
 * Portions created by ActiveState Software Inc are Copyright (C) 2000-2007
 * ActiveState Software Inc. All Rights Reserved.
 * 
 * Contributor(s):
 *   ActiveState Software Inc
 * 
 * Alternatively, the contents of this file may be used under the terms of
 * either the GNU General Public License Version 2 or later (the "GPL"), or
 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
 * in which case the provisions of the GPL or the LGPL are applicable instead
 * of those above. If you wish to allow use of your version of this file only
 * under the terms of either the GPL or the LGPL, and not to allow others to
 * use your version of this file under the terms of the MPL, indicate your
 * decision by deleting the provisions above and replace them with the notice
 * and other provisions required by the GPL or the LGPL. If you do not delete
 * the provisions above, a recipient may use your version of this file under
 * the terms of any one of the MPL, the GPL or the LGPL.
 * 
 * ***** END LICENSE BLOCK ***** */

/**
 * Komodo Toolbar Buttons
 **/

/* button-toolbar-a = used for image only buttons */
button[type="button-toolbar-a"],
.button-toolbar-a
{
    -moz-binding        : url("chrome://komodo/content/bindings/buttons.xml#button-toolbar-a");
    margin              : 1px;
    min-width           : 0px;
    max-width           : 14em;
    -moz-user-focus     : ignore;
}

.button-menu-a {
    -moz-binding        : url("chrome://komodo/content/bindings/buttons.xml#button-menu-a");
    margin              : 1px;
    min-width           : 0px;
    max-width           : 14em;
    -moz-user-focus     : ignore;
}

.button-menu-dropmarker,
.button-menubutton-dropmarker {
  margin: 1px;
  min-width:11px;
  min-height:11px;
}


/* button-toolbar-b = transparent -> image and text */
/* XXX Currently NOT used */
.button-toolbar-b
{
    -moz-binding        : url("chrome://komodo/content/bindings/buttons.xml#button-toolbar-b");
    margin              : 1px;
    min-width           : 0px;
    -moz-user-focus     : ignore;
}

/**
 * toolbar buttons on editor toolbar in workspace
 * button-toolbar-c -> regular
 * button-toolbar-d -> no text
 **/
.button-toolbar-c
{
    -moz-binding        : url("chrome://komodo/content/bindings/buttons.xml#button-toolbar-b");
    min-width           : 40px;
    max-width           : 14em;
    margin              : 0px;
    -moz-user-focus     : ignore;
}

/* no text */
.button-toolbar-d,
.button-toolbar-e
{
    -moz-binding        : url("chrome://komodo/content/bindings/buttons.xml#button-toolbar-b");
    margin              : 0px;
    min-width           : 0px;
    max-width           : 14em;
    -moz-user-focus     : ignore;
}


.button-menu-a > .button-internal-box,
.button-toolbar-a > .button-internal-box,
.button-toolbar-b > .button-internal-box
{
    padding             : 1px 1px 1px 1px;
}

.button-toolbar-c > .button-internal-box,
.button-toolbar-d > .button-internal-box,
.button-toolbar-e > .button-internal-box
{
    padding             : 1px 3px 1px 3px;
}

/* disable text buttons for button-toolbar-a */
.button-menu-a > .button-internal-box > .button-text-container,
.button-toolbar-a > .button-internal-box > .button-text-container,
.button-toolbar-d > .button-internal-box > .button-text-container,
.button-toolbar-e > .button-internal-box > .button-text-container
{
    display        : none;
}

/* enable text buttons for button-toolbar-b,c */
.button-toolbar-b > .button-internal-box > .button-text-container,
.button-toolbar-c > .button-internal-box > .button-text-container
{ }

.button-menu-a:hover,
.button-toolbar-a:hover,
.button-toolbar-b:hover,
.button-toolbar-c:hover,
.button-toolbar-d:hover,
.button-toolbar-e:hover
{
}

.button-menu-a:hover > .button-internal-box,
.button-toolbar-a:hover > .button-internal-box,
.button-toolbar-b:hover > .button-internal-box
{
}
.button-toolbar-c:hover > .button-internal-box,
.button-toolbar-d:hover > .button-internal-box,
.button-toolbar-e:hover > .button-internal-box
{
}

.button-menu-a:hover:active > .button-internal-box,
.button-toolbar-a:hover:active > .button-internal-box,
.button-toolbar-b:hover:active > .button-internal-box
{
    padding             : 2px 0px 0px 2px;
}
.button-toolbar-c:hover:active > .button-internal-box,
.button-toolbar-d:hover:active > .button-internal-box,
.button-toolbar-e:hover:active > .button-internal-box
{
    padding             : 2px 2px 0px 4px;
}

.button-menu-a[disabled="true"]:hover:active > .button-internal-box,
.button-toolbar-a[disabled="true"]:hover:active > .button-internal-box,
.button-toolbar-c[disabled="true"]:hover:active > .button-internal-box
{
}

.button-menu-a[disabled="true"],
.button-menu-a[disabled="true"]:hover,
.button-menu-a[disabled="true"]:hover:active,
.button-toolbar-a[disabled="true"],
.button-toolbar-a[disabled="true"]:hover,
.button-toolbar-a[disabled="true"]:hover:active,
.button-toolbar-b[disabled="true"],
.button-toolbar-b[disabled="true"]:hover,
.button-toolbar-b[disabled="true"]:hover:active,
.button-toolbar-c[disabled="true"],
.button-toolbar-c[disabled="true"]:hover,
.button-toolbar-c[disabled="true"]:hover:active,
.button-toolbar-d[disabled="true"],
.button-toolbar-d[disabled="true"]:hover,
.button-toolbar-d[disabled="true"]:hover:active
.button-toolbar-e[disabled="true"],
.button-toolbar-e[disabled="true"]:hover,
.button-toolbar-e[disabled="true"]:hover:active
{
}

.button-menu-a[disabled="true"] > .button-internal-box,
.button-menu-a[disabled="true"]:hover > .button-internal-box,
.button-menu-a[disabled="true"]:hover:active > .button-internal-box,
.button-toolbar-a[disabled="true"] > .button-internal-box,
.button-toolbar-a[disabled="true"]:hover > .button-internal-box,
.button-toolbar-a[disabled="true"]:hover:active > .button-internal-box,
.button-toolbar-b[disabled="true"] > .button-internal-box,
.button-toolbar-b[disabled="true"]:hover > .button-internal-box,
.button-toolbar-b[disabled="true"]:hover:active > .button-internal-box
{
    padding             : 1px 1px 1px 1px !important;
}
.button-toolbar-c[disabled="true"] > .button-internal-box,
.button-toolbar-c[disabled="true"]:hover > .button-internal-box,
.button-toolbar-c[disabled="true"]:hover:active > .button-internal-box,
.button-toolbar-d[disabled="true"] > .button-internal-box,
.button-toolbar-d[disabled="true"]:hover > .button-internal-box,
.button-toolbar-d[disabled="true"]:hover:active > .button-internal-box,
.button-toolbar-e[disabled="true"] > .button-internal-box,
.button-toolbar-e[disabled="true"]:hover > .button-internal-box,
.button-toolbar-e[disabled="true"]:hover:active > .button-internal-box
{
    padding             : 1px 3px 1px 3px !important;
}

/* toggled toolbar styles (editor formatting toolbars, etc) */
.button-toolbar-c[toggled="true"] > .button-internal-box,
.button-toolbar-d[checked="true"] > .button-internal-box,
.button-toolbar-e[checked="true"] > .button-internal-box
{
}
.button-toolbar-e[checked="true"] > .button-internal-box
{
}

.button-toolbar-c[toggled="true"]:hover > .button-internal-box,
.button-toolbar-d[checked="true"]:hover > .button-internal-box,
.button-toolbar-e[checked="true"]:hover > .button-internal-box
{
}


/** .button-text-link
 *
 * Two button classes meant to look somewhat like HTML links (<a/>).
 * You can use them in text (e.g. in a <description>). You can optionally
 * specify an image.
 *
 * If you want an image that changes on hover then the best solution is
 * to use a separate CSS class for that (e.g. see the "help-icon" class
 * in global.css) and specify both CSS classes on the <button> tag.
 * 
 * Dev Notes:
 * - Perhaps the width should not be constrained. But it *does* make it more
 *   convenient to use larger images that get scaled down proportionately.
 **/
.button-text-link
{
    -moz-binding        : url("chrome://komodo/content/bindings/buttons.xml#button-link-b");
    min-width           : 1px;
    margin              : 0px;
    padding             : 0px;
    display             : inline;
    -moz-user-focus     : ignore;
    text-decoration     : underline;
    cursor              : pointer;
}
.button-text-link .button-icon
{
    margin: 0px 2px 0px 0px;
    padding: 0px;
}
.button-text-link .button-text
{
    padding: 0px;
    margin: 0px;
}


/**
 * Link text buttons
 * Used on getting started mru list - homepage.xul/.js/.css
 **/
.button-link
{
    -moz-binding        : url("chrome://komodo/content/bindings/buttons.xml#button-link-b");
    min-width           : 1px;
    margin              : 0px;
    -moz-user-focus     : ignore;
    cursor              : pointer;
}

/**
 * Getting Started text buttons
 * Used on getting started openning project or sample - homepage.xul/.js/.css
 **/
.button-link-a
{
    -moz-binding        : url("chrome://komodo/content/bindings/buttons.xml#button-toolbar-b");
    min-width           : 1px;
    margin              : 0px;
    -moz-user-focus     : ignore;
}

/**
 * Getting Started text buttons
 * Used on getting started openning project or sample -gettingstarted.xul/.js/.css
 **/
.button-link-b
{
    -moz-binding        : url("chrome://komodo/content/bindings/buttons.xml#button-link-b");
    min-width           : 1px;
    margin              : 0px;
    -moz-user-focus     : ignore;
}

.button-link:hover,
.button-link-a:hover,
.button-link-b:hover
{
    text-decoration:underline;
}

.button-link > .button-internal-box,
.button-link-a > .button-internal-box
{
    padding             : 2px 7px 2px 6px;
}
.button-link-b > .button-internal-box
{
    padding             : 2px 2px 2px 2px;
}

.button-link-b > .button-internal-box > .button-icon
{
    padding-right : 10px;
}

.button-link[disabled="true"],
.button-link[disabled="true"]:hover,
.button-link[disabled="true"]:hover:active,
.button-link-a[disabled="true"],
.button-link-a[disabled="true"]:hover,
.button-link-a[disabled="true"]:hover:active,
.button-link-b[disabled="true"],
.button-link-b[disabled="true"]:hover,
.button-link-b[disabled="true"]:hover:active
{
}

.button-link[disabled="true"]:hover:active > .button-internal-box,
.button-link-a[disabled="true"]:hover:active > .button-internal-box,
.button-link-b[disabled="true"]:hover:active > .button-internal-box
{
}

.button-link:hover > .button-internal-box,
.button-link-a:hover > .button-internal-box
{
    padding             : 2px 7px 2px 6px;
}
.button-link-b:hover > .button-internal-box
{
    padding             : 2px 2px 2px 2px;
}

.button-link:hover:active > .button-internal-box,
.button-link-a:hover:active > .button-internal-box
{
    padding             : 2px 7px 2px 6px;
}
.button-link-b:hover:active > .button-internal-box
{
    padding             : 2px 2px 2px 2px;
}

.button-link[disabled="true"] > .button-internal-box,
.button-link[disabled="true"]:hover > .button-internal-box,
.button-link[disabled="true"]:hover:active > .button-internal-box,
.button-link-a[disabled="true"] > .button-internal-box,
.button-link-a[disabled="true"]:hover > .button-internal-box,
.button-link-a[disabled="true"]:hover:active > .button-internal-box
{
    padding             : 2px 7px 2px 6px !important;
}
.button-link-b[disabled="true"] > .button-internal-box,
.button-link-b[disabled="true"]:hover > .button-internal-box,
.button-link-b[disabled="true"]:hover:active > .button-internal-box
{
    padding             : 2px 2px 2px 2px !important;
}

.button-link > .button-internal-box > .button-text-container,
.button-link-a > .button-internal-box > .button-text-container,
.button-link-b > .button-internal-box > .button-text-container
{}

/* A small button with an image and a menu with orientation to the right.
 * Currently used in a few places.
 */
.rightarrow-button  {
    -moz-binding          : url("chrome://komodo/content/bindings/buttons.xml#rightarrow-button");
    margin		  : 1px;
    min-width		  : 0px;
    max-width		  : 14em;
    -moz-user-focus       : ignore !important;
}

.rightarrow-button > .button-internal-box,
.rightarrow-button > .menubutton-internal-box
{
   vertical-align      : middle;
}

.rightarrow-button:hover > .menubutton-internal-box  {
}

.rightarrow-button:hover:active > .menubutton-internal-box  {
    padding             : 2px 2px 0px 4px;
}

.rightarrow-button > .button-internal-box > .button-icon  {
}
.rightarrow-button:hover > .button-internal-box > .button-icon {
}
.rightarrow-button[disabled="true"] > .button-internal-box > .button-icon,
.rightarrow-button[disabled="true"]:hover > .button-internal-box > .button-icon,
.rightarrow-button[disabled="true"]:hover:active > .button-internal-box > .button-icon{
}
